{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[{\"name\":\"cryotempo\"},{\"name\":\"jatest\"},{\"name\":\"mtngla\"},{\"name\":\"mtnglauat\"},{\"name\":\"test\"},{\"name\":\"test_ja\"}]\n",
      "[{\"name\":\"AIS_BaselineC_FilteredPC\",\"region\":\"antarctic\"},{\"name\":\"oib\",\"region\":\"antarctic\"},{\"name\":\"oib\",\"region\":\"greenland\"},{\"name\":\"GRIS_BaseC_Q2\",\"region\":\"greenland\"}]\n",
      "{'gridCellMinX': -700000, 'gridCellMaxX': 900000, 'gridCellMinY': -3400000, 'gridCellMaxY': -600000, 'minTime': 1296537366, 'maxTime': 1467303342, 'totalPoints': 4986781805, 'numberOfShards': 11289}\n"
     ]
    }
   ],
   "source": [
    "import DataSetQuery\n",
    "import AsyncDataSetQuery\n",
    "import datetime\n",
    "import MalardHelpers\n",
    "import json\n",
    "\n",
    "from datetime import datetime\n",
    "\n",
    "environmentName = 'DEVv2'\n",
    "#Sets the URL of the Malard ServiceGateway.\n",
    "query = DataSetQuery.DataSetQuery('http://localhost:9000',environmentName)\n",
    "queryAsync = AsyncDataSetQuery.AsyncDataSetQuery('ws://localhost:9000',environmentName)\n",
    "\n",
    "#print(query.getEnvironment(environmentName))\n",
    "\n",
    "#determines the databases that store multiple datasets \n",
    "print(query.getParentDataSets())\n",
    "#retrieve the data sets for a given parent\n",
    "print(query.getDataSets('cryotempo'))\n",
    "#The overall data cube for the two datasets\n",
    "\n",
    "parentDs = 'cryotempo'\n",
    "dataSet = 'GRIS_BaseC_Q2'\n",
    "region='greenland'\n",
    "\n",
    "bbox = json.loads(query.getDataSetBoundingBox( parentDs,dataSet,region ))\n",
    "print(bbox)\n",
    "\n",
    "#Setup the bounding box\n",
    "minX=bbox['gridCellMinX']\n",
    "maxX=bbox['gridCellMaxX']\n",
    "minY=bbox['gridCellMinY']\n",
    "maxY=bbox['gridCellMaxY']\n",
    "minT=datetime.fromtimestamp( bbox['minTime'] )\n",
    "maxT=datetime.fromtimestamp( bbox['maxTime'] )\n",
    "\n",
    "\n",
    "#Queries the catalogue and returns the gridcells grouped by x and y with the min and max times.\n",
    "#gcsOib = query.getGridCells(  parentDs,dataSet,region,minX,maxX,minY,maxY,minT,maxT )\n",
    "#gcsSwath = query.getGridCells(  parentDs,'GRIS_BaseC_Q2',region,minX,maxX,minY,maxY,minT,maxT )\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[{\"gridCellMinX\":500000,\"gridCellMaxX\":600000,\"gridCellMinY\":-600000,\"gridCellMaxY\":-500000,\"minTime\":1301319948,\"maxTime\":1301320724,\"totalPoints\":13199,\"numberOfShards\":1},{\"gridCellMinX\":400000,\"gridCellMaxX\":500000,\"gridCellMinY\":-400000,\"gridCellMaxY\":-300000,\"minTime\":1301318784,\"maxTime\":1301318784,\"totalPoints\":5218,\"numberOfShards\":1},{\"gridCellMinX\":400000,\"gridCellMaxX\":500000,\"gridCellMinY\":-500000,\"gridCellMaxY\":-400000,\"minTime\":1301318784,\"maxTime\":1301319560,\"totalPoints\":7517,\"numberOfShards\":1},{\"gridCellMinX\":400000,\"gridCellMaxX\":500000,\"gridCellMinY\":-800000,\"gridCellMaxY\":-700000,\"minTime\":1301322665,\"maxTime\":1301323441,\"totalPoints\":13396,\"numberOfShards\":1},{\"gridCellMinX\":300000,\"gridCellMaxX\":400000,\"gridCellMinY\":-300000,\"gridCellMaxY\":-200000,\"minTime\":1301317231,\"maxTime\":1301317620,\"totalPoints\":10461,\"numberOfShards\":1},{\"gridCellMinX\":300000,\"gridCellMaxX\":400000,\"gridCellMinY\":-400000,\"gridCellMaxY\":-300000,\"minTime\":1301317231,\"maxTime\":1301317231,\"totalPoints\":1799,\"numberOfShards\":1},{\"gridCellMinX\":200000,\"gridCellMaxX\":300000,\"gridCellMinY\":-400000,\"gridCellMaxY\":-300000,\"minTime\":1301146464,\"maxTime\":1301316843,\"totalPoints\":42237,\"numberOfShards\":1},{\"gridCellMinX\":200000,\"gridCellMaxX\":300000,\"gridCellMinY\":-500000,\"gridCellMaxY\":-400000,\"minTime\":1301148015,\"maxTime\":1301148791,\"totalPoints\":12945,\"numberOfShards\":1},{\"gridCellMinX\":200000,\"gridCellMaxX\":300000,\"gridCellMinY\":-600000,\"gridCellMaxY\":-500000,\"minTime\":1301148791,\"maxTime\":1301149955,\"totalPoints\":19307,\"numberOfShards\":1},{\"gridCellMinX\":200000,\"gridCellMaxX\":300000,\"gridCellMinY\":-700000,\"gridCellMaxY\":-600000,\"minTime\":1301149567,\"maxTime\":1301325382,\"totalPoints\":15805,\"numberOfShards\":1},{\"gridCellMinX\":100000,\"gridCellMaxX\":200000,\"gridCellMinY\":-500000,\"gridCellMaxY\":-400000,\"minTime\":1301145300,\"maxTime\":1301316067,\"totalPoints\":42360,\"numberOfShards\":1},{\"gridCellMinX\":100000,\"gridCellMaxX\":200000,\"gridCellMinY\":-700000,\"gridCellMaxY\":-600000,\"minTime\":1301325382,\"maxTime\":1301326546,\"totalPoints\":14150,\"numberOfShards\":1},{\"gridCellMinX\":100000,\"gridCellMaxX\":200000,\"gridCellMinY\":-1600000,\"gridCellMaxY\":-1500000,\"minTime\":1301404681,\"maxTime\":1301405069,\"totalPoints\":6554,\"numberOfShards\":1},{\"gridCellMinX\":0,\"gridCellMaxX\":100000,\"gridCellMinY\":-500000,\"gridCellMaxY\":-400000,\"minTime\":1301144912,\"maxTime\":1301314903,\"totalPoints\":23586,\"numberOfShards\":1},{\"gridCellMinX\":0,\"gridCellMaxX\":100000,\"gridCellMinY\":-600000,\"gridCellMaxY\":-500000,\"minTime\":1301144524,\"maxTime\":1301314903,\"totalPoints\":43301,\"numberOfShards\":1},{\"gridCellMinX\":0,\"gridCellMaxX\":100000,\"gridCellMinY\":-700000,\"gridCellMaxY\":-600000,\"minTime\":1301154611,\"maxTime\":1301327322,\"totalPoints\":26204,\"numberOfShards\":1},{\"gridCellMinX\":0,\"gridCellMaxX\":100000,\"gridCellMinY\":-1300000,\"gridCellMaxY\":-1200000,\"minTime\":1301402352,\"maxTime\":1301402352,\"totalPoints\":267,\"numberOfShards\":1},{\"gridCellMinX\":100000,\"gridCellMaxX\":200000,\"gridCellMinY\":-400000,\"gridCellMaxY\":-300000,\"minTime\":1301146076,\"maxTime\":1301316067,\"totalPoints\":10170,\"numberOfShards\":1},{\"gridCellMinX\":0,\"gridCellMaxX\":100000,\"gridCellMinY\":-1500000,\"gridCellMaxY\":-1400000,\"minTime\":1301403128,\"maxTime\":1301414322,\"totalPoints\":21910,\"numberOfShards\":1},{\"gridCellMinX\":-100000,\"gridCellMaxX\":0,\"gridCellMinY\":-500000,\"gridCellMaxY\":-400000,\"minTime\":1301156553,\"maxTime\":1301157329,\"totalPoints\":17800,\"numberOfShards\":1},{\"gridCellMinX\":500000,\"gridCellMaxX\":600000,\"gridCellMinY\":-500000,\"gridCellMaxY\":-400000,\"minTime\":1301319560,\"maxTime\":1301319948,\"totalPoints\":6262,\"numberOfShards\":1},{\"gridCellMinX\":-100000,\"gridCellMaxX\":0,\"gridCellMinY\":-600000,\"gridCellMaxY\":-500000,\"minTime\":1301142584,\"maxTime\":1301314127,\"totalPoints\":25084,\"numberOfShards\":1},{\"gridCellMinX\":-100000,\"gridCellMaxX\":0,\"gridCellMinY\":-800000,\"gridCellMaxY\":-700000,\"minTime\":1301327322,\"maxTime\":1301328098,\"totalPoints\":12895,\"numberOfShards\":1},{\"gridCellMinX\":-100000,\"gridCellMaxX\":0,\"gridCellMinY\":-1000000,\"gridCellMaxY\":-900000,\"minTime\":1301399247,\"maxTime\":1301400023,\"totalPoints\":13406,\"numberOfShards\":1},{\"gridCellMinX\":500000,\"gridCellMaxX\":600000,\"gridCellMinY\":-700000,\"gridCellMaxY\":-600000,\"minTime\":1301321889,\"maxTime\":1301321889,\"totalPoints\":556,\"numberOfShards\":1},{\"gridCellMinX\":-100000,\"gridCellMaxX\":0,\"gridCellMinY\":-1400000,\"gridCellMaxY\":-1300000,\"minTime\":1301414322,\"maxTime\":1301415099,\"totalPoints\":11616,\"numberOfShards\":1},{\"gridCellMinX\":-100000,\"gridCellMaxX\":0,\"gridCellMinY\":-1600000,\"gridCellMaxY\":-1500000,\"minTime\":1301406233,\"maxTime\":1301406233,\"totalPoints\":3059,\"numberOfShards\":1},{\"gridCellMinX\":-100000,\"gridCellMaxX\":0,\"gridCellMinY\":-1500000,\"gridCellMaxY\":-1400000,\"minTime\":1301413158,\"maxTime\":1301414322,\"totalPoints\":13097,\"numberOfShards\":1},{\"gridCellMinX\":-100000,\"gridCellMaxX\":0,\"gridCellMinY\":-1700000,\"gridCellMaxY\":-1600000,\"minTime\":1301406233,\"maxTime\":1301407009,\"totalPoints\":10045,\"numberOfShards\":1},{\"gridCellMinX\":-100000,\"gridCellMaxX\":0,\"gridCellMinY\":-2300000,\"gridCellMaxY\":-2200000,\"minTime\":1301578568,\"maxTime\":1301582849,\"totalPoints\":4663,\"numberOfShards\":1},{\"gridCellMinX\":-200000,\"gridCellMaxX\":-100000,\"gridCellMinY\":-700000,\"gridCellMaxY\":-600000,\"minTime\":1300367181,\"maxTime\":1301312962,\"totalPoints\":28685,\"numberOfShards\":1},{\"gridCellMinX\":-200000,\"gridCellMaxX\":-100000,\"gridCellMinY\":-800000,\"gridCellMaxY\":-700000,\"minTime\":1300366793,\"maxTime\":1301328875,\"totalPoints\":40543,\"numberOfShards\":1},{\"gridCellMinX\":-200000,\"gridCellMaxX\":-100000,\"gridCellMinY\":-1400000,\"gridCellMaxY\":-1300000,\"minTime\":1301415099,\"maxTime\":1301416263,\"totalPoints\":14887,\"numberOfShards\":1},{\"gridCellMinX\":-200000,\"gridCellMaxX\":-100000,\"gridCellMinY\":-2000000,\"gridCellMaxY\":-1900000,\"minTime\":1301573911,\"maxTime\":1301574687,\"totalPoints\":12944,\"numberOfShards\":1},{\"gridCellMinX\":-200000,\"gridCellMaxX\":-100000,\"gridCellMinY\":-2200000,\"gridCellMaxY\":-2100000,\"minTime\":1301577403,\"maxTime\":1301578180,\"totalPoints\":12182,\"numberOfShards\":1},{\"gridCellMinX\":-200000,\"gridCellMaxX\":-100000,\"gridCellMinY\":-2300000,\"gridCellMaxY\":-2200000,\"minTime\":1301578180,\"maxTime\":1301584795,\"totalPoints\":43526,\"numberOfShards\":1},{\"gridCellMinX\":-200000,\"gridCellMaxX\":-100000,\"gridCellMinY\":-2400000,\"gridCellMaxY\":-2300000,\"minTime\":1301584795,\"maxTime\":1301587913,\"totalPoints\":24128,\"numberOfShards\":1},{\"gridCellMinX\":-200000,\"gridCellMaxX\":-100000,\"gridCellMinY\":-2500000,\"gridCellMaxY\":-2400000,\"minTime\":1301587913,\"maxTime\":1301590342,\"totalPoints\":15990,\"numberOfShards\":1},{\"gridCellMinX\":-600000,\"gridCellMaxX\":-500000,\"gridCellMinY\":-1400000,\"gridCellMaxY\":-1300000,\"minTime\":1300300423,\"maxTime\":1301567315,\"totalPoints\":92952,\"numberOfShards\":1},{\"gridCellMinX\":-600000,\"gridCellMaxX\":-500000,\"gridCellMinY\":-1500000,\"gridCellMaxY\":-1400000,\"minTime\":1301393426,\"maxTime\":1301418980,\"totalPoints\":12373,\"numberOfShards\":1},{\"gridCellMinX\":-700000,\"gridCellMaxX\":-600000,\"gridCellMinY\":-600000,\"gridCellMaxY\":-500000,\"minTime\":1300459619,\"maxTime\":1300460395,\"totalPoints\":14377,\"numberOfShards\":1},{\"gridCellMinX\":-100000,\"gridCellMaxX\":0,\"gridCellMinY\":-1200000,\"gridCellMaxY\":-1100000,\"minTime\":1301400800,\"maxTime\":1301401576,\"totalPoints\":12138,\"numberOfShards\":1},{\"gridCellMinX\":-1900000,\"gridCellMaxX\":-1800000,\"gridCellMinY\":-100000,\"gridCellMaxY\":0,\"minTime\":1301050565,\"maxTime\":1301051341,\"totalPoints\":11746,\"numberOfShards\":1},{\"gridCellMinX\":-1600000,\"gridCellMaxX\":-1500000,\"gridCellMinY\":100000,\"gridCellMaxY\":200000,\"minTime\":1300287997,\"maxTime\":1300287997,\"totalPoints\":3540,\"numberOfShards\":1},{\"gridCellMinX\":-400000,\"gridCellMaxX\":-300000,\"gridCellMinY\":-1300000,\"gridCellMaxY\":-1200000,\"minTime\":1301395754,\"maxTime\":1301395754,\"totalPoints\":2830,\"numberOfShards\":1},{\"gridCellMinX\":-800000,\"gridCellMaxX\":-700000,\"gridCellMinY\":100000,\"gridCellMaxY\":200000,\"minTime\":1300814131,\"maxTime\":1300814908,\"totalPoints\":11439,\"numberOfShards\":1},{\"gridCellMinX\":-800000,\"gridCellMaxX\":-700000,\"gridCellMinY\":0,\"gridCellMaxY\":100000,\"minTime\":1300813738,\"maxTime\":1300814131,\"totalPoints\":5756,\"numberOfShards\":1},{\"gridCellMinX\":-700000,\"gridCellMaxX\":-600000,\"gridCellMinY\":-1400000,\"gridCellMaxY\":-1300000,\"minTime\":1300300423,\"maxTime\":1301566151,\"totalPoints\":18486,\"numberOfShards\":1},{\"gridCellMinX\":-100000,\"gridCellMaxX\":0,\"gridCellMinY\":-1300000,\"gridCellMaxY\":-1200000,\"minTime\":1301401576,\"maxTime\":1301402352,\"totalPoints\":11915,\"numberOfShards\":1},{\"gridCellMinX\":-1000000,\"gridCellMaxX\":-900000,\"gridCellMinY\":-400000,\"gridCellMaxY\":-300000,\"minTime\":1300281400,\"maxTime\":1300282564,\"totalPoints\":13374,\"numberOfShards\":1},{\"gridCellMinX\":-1100000,\"gridCellMaxX\":-1000000,\"gridCellMinY\":-400000,\"gridCellMaxY\":-300000,\"minTime\":1300282564,\"maxTime\":1300282564,\"totalPoints\":5108,\"numberOfShards\":1},{\"gridCellMinX\":-800000,\"gridCellMaxX\":-700000,\"gridCellMinY\":-400000,\"gridCellMaxY\":-300000,\"minTime\":1301059134,\"maxTime\":1301059522,\"totalPoints\":4623,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":-600000,\"gridCellMaxY\":-500000,\"minTime\":1300367957,\"maxTime\":1300806673,\"totalPoints\":24572,\"numberOfShards\":1},{\"gridCellMinX\":-1200000,\"gridCellMaxX\":-1100000,\"gridCellMinY\":-200000,\"gridCellMaxY\":-100000,\"minTime\":1300283728,\"maxTime\":1300284504,\"totalPoints\":11169,\"numberOfShards\":1},{\"gridCellMinX\":400000,\"gridCellMaxX\":500000,\"gridCellMinY\":-700000,\"gridCellMaxY\":-600000,\"minTime\":1301323441,\"maxTime\":1301323829,\"totalPoints\":761,\"numberOfShards\":1},{\"gridCellMinX\":0,\"gridCellMaxX\":100000,\"gridCellMinY\":-800000,\"gridCellMaxY\":-700000,\"minTime\":1301327322,\"maxTime\":1301327322,\"totalPoints\":2910,\"numberOfShards\":1},{\"gridCellMinX\":-100000,\"gridCellMaxX\":0,\"gridCellMinY\":-1100000,\"gridCellMaxY\":-1000000,\"minTime\":1301400023,\"maxTime\":1301400800,\"totalPoints\":12352,\"numberOfShards\":1},{\"gridCellMinX\":-400000,\"gridCellMaxX\":-300000,\"gridCellMinY\":-1100000,\"gridCellMaxY\":-1000000,\"minTime\":1301396919,\"maxTime\":1301396919,\"totalPoints\":1189,\"numberOfShards\":1},{\"gridCellMinX\":-1300000,\"gridCellMaxX\":-1200000,\"gridCellMinY\":-100000,\"gridCellMaxY\":0,\"minTime\":1300284892,\"maxTime\":1300285668,\"totalPoints\":10314,\"numberOfShards\":1},{\"gridCellMinX\":-500000,\"gridCellMaxX\":-400000,\"gridCellMinY\":-500000,\"gridCellMaxY\":-400000,\"minTime\":1300461559,\"maxTime\":1300465052,\"totalPoints\":19593,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":-200000,\"gridCellMaxY\":-100000,\"minTime\":1300371061,\"maxTime\":1300377044,\"totalPoints\":24686,\"numberOfShards\":1},{\"gridCellMinX\":-900000,\"gridCellMaxX\":-800000,\"gridCellMinY\":100000,\"gridCellMaxY\":200000,\"minTime\":1300814908,\"maxTime\":1300815296,\"totalPoints\":6227,\"numberOfShards\":1},{\"gridCellMinX\":300000,\"gridCellMaxX\":400000,\"gridCellMinY\":-700000,\"gridCellMaxY\":-600000,\"minTime\":1301323829,\"maxTime\":1301324605,\"totalPoints\":15506,\"numberOfShards\":1},{\"gridCellMinX\":-1900000,\"gridCellMaxX\":-1800000,\"gridCellMinY\":400000,\"gridCellMaxY\":500000,\"minTime\":1300901405,\"maxTime\":1300911107,\"totalPoints\":6349,\"numberOfShards\":1},{\"gridCellMinX\":-500000,\"gridCellMaxX\":-400000,\"gridCellMinY\":-1500000,\"gridCellMaxY\":-1400000,\"minTime\":1301417816,\"maxTime\":1301418204,\"totalPoints\":8660,\"numberOfShards\":1},{\"gridCellMinX\":-400000,\"gridCellMaxX\":-300000,\"gridCellMinY\":-1500000,\"gridCellMaxY\":-1400000,\"minTime\":1301417816,\"maxTime\":1301417816,\"totalPoints\":494,\"numberOfShards\":1},{\"gridCellMinX\":-100000,\"gridCellMaxX\":0,\"gridCellMinY\":-700000,\"gridCellMaxY\":-600000,\"minTime\":1301312962,\"maxTime\":1301313738,\"totalPoints\":10926,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":-2100000,\"gridCellMaxY\":-2000000,\"minTime\":1301575463,\"maxTime\":1301576239,\"totalPoints\":14044,\"numberOfShards\":1},{\"gridCellMinX\":-800000,\"gridCellMaxX\":-700000,\"gridCellMinY\":-300000,\"gridCellMaxY\":-200000,\"minTime\":1301058746,\"maxTime\":1301059134,\"totalPoints\":5901,\"numberOfShards\":1},{\"gridCellMinX\":600000,\"gridCellMaxX\":700000,\"gridCellMinY\":-700000,\"gridCellMaxY\":-600000,\"minTime\":1301320724,\"maxTime\":1301321889,\"totalPoints\":19733,\"numberOfShards\":1},{\"gridCellMinX\":-200000,\"gridCellMaxX\":-100000,\"gridCellMinY\":-600000,\"gridCellMaxY\":-500000,\"minTime\":1301063954,\"maxTime\":1301158493,\"totalPoints\":16500,\"numberOfShards\":1},{\"gridCellMinX\":-2100000,\"gridCellMaxX\":-2000000,\"gridCellMinY\":400000,\"gridCellMaxY\":500000,\"minTime\":1300900628,\"maxTime\":1300900628,\"totalPoints\":1102,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":-2400000,\"gridCellMaxY\":-2300000,\"minTime\":1301585961,\"maxTime\":1301586349,\"totalPoints\":5031,\"numberOfShards\":1},{\"gridCellMinX\":-2100000,\"gridCellMaxX\":-2000000,\"gridCellMinY\":-100000,\"gridCellMaxY\":0,\"minTime\":1301049013,\"maxTime\":1301049789,\"totalPoints\":11724,\"numberOfShards\":1},{\"gridCellMinX\":-700000,\"gridCellMaxX\":-600000,\"gridCellMinY\":-100000,\"gridCellMaxY\":0,\"minTime\":1300812254,\"maxTime\":1300812254,\"totalPoints\":834,\"numberOfShards\":1},{\"gridCellMinX\":-1300000,\"gridCellMaxX\":-1200000,\"gridCellMinY\":-200000,\"gridCellMaxY\":-100000,\"minTime\":1300284504,\"maxTime\":1301055512,\"totalPoints\":11719,\"numberOfShards\":1},{\"gridCellMinX\":-1500000,\"gridCellMaxX\":-1400000,\"gridCellMinY\":-200000,\"gridCellMaxY\":-100000,\"minTime\":1301053670,\"maxTime\":1301054058,\"totalPoints\":6261,\"numberOfShards\":1},{\"gridCellMinX\":-1100000,\"gridCellMaxX\":-1000000,\"gridCellMinY\":-300000,\"gridCellMaxY\":-200000,\"minTime\":1300282564,\"maxTime\":1300283340,\"totalPoints\":12221,\"numberOfShards\":1},{\"gridCellMinX\":-400000,\"gridCellMaxX\":-300000,\"gridCellMinY\":-400000,\"gridCellMaxY\":-300000,\"minTime\":1300454962,\"maxTime\":1301062789,\"totalPoints\":63093,\"numberOfShards\":1},{\"gridCellMinX\":-600000,\"gridCellMaxX\":-500000,\"gridCellMinY\":-600000,\"gridCellMaxY\":-500000,\"minTime\":1300459231,\"maxTime\":1300460783,\"totalPoints\":9271,\"numberOfShards\":1},{\"gridCellMinX\":-1800000,\"gridCellMaxX\":-1700000,\"gridCellMinY\":-200000,\"gridCellMaxY\":-100000,\"minTime\":1301052118,\"maxTime\":1301052118,\"totalPoints\":1864,\"numberOfShards\":1},{\"gridCellMinX\":-700000,\"gridCellMaxX\":-600000,\"gridCellMinY\":-400000,\"gridCellMaxY\":-300000,\"minTime\":1301059910,\"maxTime\":1301060461,\"totalPoints\":5928,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":-900000,\"gridCellMaxY\":-800000,\"minTime\":1301310245,\"maxTime\":1301330039,\"totalPoints\":31385,\"numberOfShards\":1},{\"gridCellMinX\":-400000,\"gridCellMaxX\":-300000,\"gridCellMinY\":-300000,\"gridCellMaxY\":-200000,\"minTime\":1300455738,\"maxTime\":1300809925,\"totalPoints\":40723,\"numberOfShards\":1},{\"gridCellMinX\":-1500000,\"gridCellMaxX\":-1400000,\"gridCellMinY\":0,\"gridCellMaxY\":100000,\"minTime\":1300286833,\"maxTime\":1300287221,\"totalPoints\":7541,\"numberOfShards\":1},{\"gridCellMinX\":-500000,\"gridCellMaxX\":-400000,\"gridCellMinY\":-400000,\"gridCellMaxY\":-300000,\"minTime\":1300457290,\"maxTime\":1301062013,\"totalPoints\":34963,\"numberOfShards\":1},{\"gridCellMinX\":-900000,\"gridCellMaxX\":-800000,\"gridCellMinY\":-300000,\"gridCellMaxY\":-200000,\"minTime\":1301058217,\"maxTime\":1301058746,\"totalPoints\":8606,\"numberOfShards\":1},{\"gridCellMinX\":-1600000,\"gridCellMaxX\":-1500000,\"gridCellMinY\":-200000,\"gridCellMaxY\":-100000,\"minTime\":1301052894,\"maxTime\":1301053670,\"totalPoints\":11428,\"numberOfShards\":1},{\"gridCellMinX\":-1400000,\"gridCellMaxX\":-1300000,\"gridCellMinY\":0,\"gridCellMaxY\":100000,\"minTime\":1300286056,\"maxTime\":1300286833,\"totalPoints\":10039,\"numberOfShards\":1},{\"gridCellMinX\":-1400000,\"gridCellMaxX\":-1300000,\"gridCellMinY\":-100000,\"gridCellMaxY\":0,\"minTime\":1300285668,\"maxTime\":1300286056,\"totalPoints\":6978,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":-800000,\"gridCellMaxY\":-700000,\"minTime\":1301160045,\"maxTime\":1301328875,\"totalPoints\":4711,\"numberOfShards\":1},{\"gridCellMinX\":-400000,\"gridCellMaxX\":-300000,\"gridCellMinY\":-1200000,\"gridCellMaxY\":-1100000,\"minTime\":1301395754,\"maxTime\":1301396919,\"totalPoints\":16043,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":100000,\"gridCellMaxY\":200000,\"minTime\":1300373930,\"maxTime\":1300375094,\"totalPoints\":21671,\"numberOfShards\":1},{\"gridCellMinX\":-1800000,\"gridCellMaxX\":-1700000,\"gridCellMinY\":-100000,\"gridCellMaxY\":0,\"minTime\":1301051341,\"maxTime\":1301052118,\"totalPoints\":9944,\"numberOfShards\":1},{\"gridCellMinX\":-1700000,\"gridCellMaxX\":-1600000,\"gridCellMinY\":-200000,\"gridCellMaxY\":-100000,\"minTime\":1301052118,\"maxTime\":1301052894,\"totalPoints\":11624,\"numberOfShards\":1},{\"gridCellMinX\":-500000,\"gridCellMaxX\":-400000,\"gridCellMinY\":-600000,\"gridCellMaxY\":-500000,\"minTime\":1300465052,\"maxTime\":1300465829,\"totalPoints\":12316,\"numberOfShards\":1},{\"gridCellMinX\":-1900000,\"gridCellMaxX\":-1800000,\"gridCellMinY\":300000,\"gridCellMaxY\":400000,\"minTime\":1300901405,\"maxTime\":1300910718,\"totalPoints\":144406,\"numberOfShards\":1},{\"gridCellMinX\":-900000,\"gridCellMaxX\":-800000,\"gridCellMinY\":-600000,\"gridCellMaxY\":-500000,\"minTime\":1300280235,\"maxTime\":1300280235,\"totalPoints\":2856,\"numberOfShards\":1},{\"gridCellMinX\":-700000,\"gridCellMaxX\":-600000,\"gridCellMinY\":0,\"gridCellMaxY\":100000,\"minTime\":1300813738,\"maxTime\":1300813738,\"totalPoints\":1216,\"numberOfShards\":1},{\"gridCellMinX\":0,\"gridCellMaxX\":100000,\"gridCellMinY\":-400000,\"gridCellMaxY\":-300000,\"minTime\":1301151895,\"maxTime\":1301153059,\"totalPoints\":13988,\"numberOfShards\":1},{\"gridCellMinX\":-2000000,\"gridCellMaxX\":-1900000,\"gridCellMinY\":-100000,\"gridCellMaxY\":0,\"minTime\":1301049789,\"maxTime\":1301050565,\"totalPoints\":11630,\"numberOfShards\":1},{\"gridCellMinX\":-200000,\"gridCellMaxX\":-100000,\"gridCellMinY\":-1000000,\"gridCellMaxY\":-900000,\"minTime\":1301398083,\"maxTime\":1301399247,\"totalPoints\":14127,\"numberOfShards\":1},{\"gridCellMinX\":-600000,\"gridCellMaxX\":-500000,\"gridCellMinY\":-500000,\"gridCellMaxY\":-400000,\"minTime\":1300458454,\"maxTime\":1300461559,\"totalPoints\":25974,\"numberOfShards\":1},{\"gridCellMinX\":-600000,\"gridCellMaxX\":-500000,\"gridCellMinY\":-400000,\"gridCellMaxY\":-300000,\"minTime\":1300458066,\"maxTime\":1301061237,\"totalPoints\":14400,\"numberOfShards\":1},{\"gridCellMinX\":-1400000,\"gridCellMaxX\":-1300000,\"gridCellMinY\":-200000,\"gridCellMaxY\":-100000,\"minTime\":1301054446,\"maxTime\":1301054834,\"totalPoints\":6699,\"numberOfShards\":1},{\"gridCellMinX\":-600000,\"gridCellMaxX\":-500000,\"gridCellMinY\":-200000,\"gridCellMaxY\":-100000,\"minTime\":1300811089,\"maxTime\":1300811477,\"totalPoints\":3855,\"numberOfShards\":1},{\"gridCellMinX\":-1500000,\"gridCellMaxX\":-1400000,\"gridCellMinY\":100000,\"gridCellMaxY\":200000,\"minTime\":1300287221,\"maxTime\":1300287997,\"totalPoints\":9707,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":-2600000,\"gridCellMaxY\":-2500000,\"minTime\":1301589077,\"maxTime\":1301593287,\"totalPoints\":8838,\"numberOfShards\":1},{\"gridCellMinX\":100000,\"gridCellMaxX\":200000,\"gridCellMinY\":-600000,\"gridCellMaxY\":-500000,\"minTime\":1301149955,\"maxTime\":1301150731,\"totalPoints\":8891,\"numberOfShards\":1},{\"gridCellMinX\":-800000,\"gridCellMaxX\":-700000,\"gridCellMinY\":-600000,\"gridCellMaxY\":-500000,\"minTime\":1300279460,\"maxTime\":1300280235,\"totalPoints\":13840,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":-1700000,\"gridCellMaxY\":-1600000,\"minTime\":1301407725,\"maxTime\":1301571582,\"totalPoints\":20083,\"numberOfShards\":1},{\"gridCellMinX\":-200000,\"gridCellMaxX\":-100000,\"gridCellMinY\":-500000,\"gridCellMaxY\":-400000,\"minTime\":1301063954,\"maxTime\":1301063954,\"totalPoints\":805,\"numberOfShards\":1},{\"gridCellMinX\":-600000,\"gridCellMaxX\":-500000,\"gridCellMinY\":-100000,\"gridCellMaxY\":0,\"minTime\":1300811477,\"maxTime\":1300812254,\"totalPoints\":12936,\"numberOfShards\":1},{\"gridCellMinX\":-200000,\"gridCellMaxX\":-100000,\"gridCellMinY\":-1700000,\"gridCellMaxY\":-1600000,\"minTime\":1301407009,\"maxTime\":1301407725,\"totalPoints\":11872,\"numberOfShards\":1},{\"gridCellMinX\":-500000,\"gridCellMaxX\":-400000,\"gridCellMinY\":-1300000,\"gridCellMaxY\":-1200000,\"minTime\":1301394978,\"maxTime\":1301395754,\"totalPoints\":12895,\"numberOfShards\":1},{\"gridCellMinX\":-900000,\"gridCellMaxX\":-800000,\"gridCellMinY\":-500000,\"gridCellMaxY\":-400000,\"minTime\":1300280235,\"maxTime\":1300281400,\"totalPoints\":14848,\"numberOfShards\":1},{\"gridCellMinX\":-500000,\"gridCellMaxX\":-400000,\"gridCellMinY\":-300000,\"gridCellMaxY\":-200000,\"minTime\":1300456902,\"maxTime\":1300809925,\"totalPoints\":12060,\"numberOfShards\":1},{\"gridCellMinX\":-500000,\"gridCellMaxX\":-400000,\"gridCellMinY\":-200000,\"gridCellMaxY\":-100000,\"minTime\":1300809925,\"maxTime\":1300811089,\"totalPoints\":15573,\"numberOfShards\":1},{\"gridCellMinX\":0,\"gridCellMaxX\":100000,\"gridCellMinY\":-1400000,\"gridCellMaxY\":-1300000,\"minTime\":1301402352,\"maxTime\":1301403128,\"totalPoints\":12292,\"numberOfShards\":1},{\"gridCellMinX\":-400000,\"gridCellMaxX\":-300000,\"gridCellMinY\":-1800000,\"gridCellMaxY\":-1700000,\"minTime\":1301408501,\"maxTime\":1301408501,\"totalPoints\":2127,\"numberOfShards\":1},{\"gridCellMinX\":-400000,\"gridCellMaxX\":-300000,\"gridCellMinY\":-1000000,\"gridCellMaxY\":-900000,\"minTime\":1301309857,\"maxTime\":1301330039,\"totalPoints\":7999,\"numberOfShards\":1},{\"gridCellMinX\":-1200000,\"gridCellMaxX\":-1100000,\"gridCellMinY\":-300000,\"gridCellMaxY\":-200000,\"minTime\":1300283340,\"maxTime\":1301056304,\"totalPoints\":11232,\"numberOfShards\":1},{\"gridCellMinX\":-400000,\"gridCellMaxX\":-300000,\"gridCellMinY\":-1600000,\"gridCellMaxY\":-1500000,\"minTime\":1301410830,\"maxTime\":1301411218,\"totalPoints\":7011,\"numberOfShards\":1},{\"gridCellMinX\":-400000,\"gridCellMaxX\":-300000,\"gridCellMinY\":-900000,\"gridCellMaxY\":-800000,\"minTime\":1301310245,\"maxTime\":1301330039,\"totalPoints\":5229,\"numberOfShards\":1},{\"gridCellMinX\":-400000,\"gridCellMaxX\":-300000,\"gridCellMinY\":-500000,\"gridCellMaxY\":-400000,\"minTime\":1300464276,\"maxTime\":1300464276,\"totalPoints\":1552,\"numberOfShards\":1},{\"gridCellMinX\":-1000000,\"gridCellMaxX\":-900000,\"gridCellMinY\":-500000,\"gridCellMaxY\":-400000,\"minTime\":1300281400,\"maxTime\":1300281400,\"totalPoints\":4046,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":-1500000,\"gridCellMaxY\":-1400000,\"minTime\":1301411994,\"maxTime\":1301570030,\"totalPoints\":13021,\"numberOfShards\":1},{\"gridCellMinX\":500000,\"gridCellMaxX\":600000,\"gridCellMinY\":-800000,\"gridCellMaxY\":-700000,\"minTime\":1301321889,\"maxTime\":1301322665,\"totalPoints\":12503,\"numberOfShards\":1},{\"gridCellMinX\":0,\"gridCellMaxX\":100000,\"gridCellMinY\":-1600000,\"gridCellMaxY\":-1500000,\"minTime\":1301403904,\"maxTime\":1301406233,\"totalPoints\":29161,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":-2500000,\"gridCellMaxY\":-2400000,\"minTime\":1301590730,\"maxTime\":1301591118,\"totalPoints\":1398,\"numberOfShards\":1},{\"gridCellMinX\":-200000,\"gridCellMaxX\":-100000,\"gridCellMinY\":-2100000,\"gridCellMaxY\":-2000000,\"minTime\":1301576239,\"maxTime\":1301577403,\"totalPoints\":18517,\"numberOfShards\":1},{\"gridCellMinX\":-2200000,\"gridCellMaxX\":-2100000,\"gridCellMinY\":-100000,\"gridCellMaxY\":0,\"minTime\":1301048615,\"maxTime\":1301049013,\"totalPoints\":6170,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":-2300000,\"gridCellMaxY\":-2200000,\"minTime\":1301579741,\"maxTime\":1301586349,\"totalPoints\":11786,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":-2000000,\"gridCellMaxY\":-1900000,\"minTime\":1301573135,\"maxTime\":1301575463,\"totalPoints\":26237,\"numberOfShards\":1},{\"gridCellMinX\":-100000,\"gridCellMaxX\":0,\"gridCellMinY\":-2400000,\"gridCellMaxY\":-2300000,\"minTime\":1301584795,\"maxTime\":1301585183,\"totalPoints\":4420,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":-1800000,\"gridCellMaxY\":-1700000,\"minTime\":1301408113,\"maxTime\":1301572359,\"totalPoints\":16261,\"numberOfShards\":1},{\"gridCellMinX\":-500000,\"gridCellMaxX\":-400000,\"gridCellMinY\":-1400000,\"gridCellMaxY\":-1300000,\"minTime\":1301394202,\"maxTime\":1301568090,\"totalPoints\":19901,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":0,\"gridCellMaxY\":100000,\"minTime\":1300373001,\"maxTime\":1300375880,\"totalPoints\":12193,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":-1900000,\"gridCellMaxY\":-1800000,\"minTime\":1301572359,\"maxTime\":1301573135,\"totalPoints\":11827,\"numberOfShards\":1},{\"gridCellMinX\":-2200000,\"gridCellMaxX\":-2100000,\"gridCellMinY\":0,\"gridCellMaxY\":100000,\"minTime\":1301048615,\"maxTime\":1301048615,\"totalPoints\":4554,\"numberOfShards\":1},{\"gridCellMinX\":-1300000,\"gridCellMaxX\":-1200000,\"gridCellMinY\":-300000,\"gridCellMaxY\":-200000,\"minTime\":1301055512,\"maxTime\":1301055512,\"totalPoints\":2774,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":-1600000,\"gridCellMaxY\":-1500000,\"minTime\":1301411218,\"maxTime\":1301570806,\"totalPoints\":23820,\"numberOfShards\":1},{\"gridCellMinX\":-2000000,\"gridCellMaxX\":-1900000,\"gridCellMinY\":400000,\"gridCellMaxY\":500000,\"minTime\":1300900628,\"maxTime\":1300901405,\"totalPoints\":12487,\"numberOfShards\":1},{\"gridCellMinX\":-400000,\"gridCellMaxX\":-300000,\"gridCellMinY\":-1400000,\"gridCellMaxY\":-1300000,\"minTime\":1301417039,\"maxTime\":1301568866,\"totalPoints\":25783,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":-1400000,\"gridCellMaxY\":-1300000,\"minTime\":1301416263,\"maxTime\":1301569254,\"totalPoints\":18030,\"numberOfShards\":1},{\"gridCellMinX\":-200000,\"gridCellMaxX\":-100000,\"gridCellMinY\":-1500000,\"gridCellMaxY\":-1400000,\"minTime\":1301412382,\"maxTime\":1301413158,\"totalPoints\":12265,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":-1100000,\"gridCellMaxY\":-1000000,\"minTime\":1301396919,\"maxTime\":1301397695,\"totalPoints\":15068,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":-1000000,\"gridCellMaxY\":-900000,\"minTime\":1301397695,\"maxTime\":1301398083,\"totalPoints\":5162,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":-100000,\"gridCellMaxY\":0,\"minTime\":1300371837,\"maxTime\":1300376656,\"totalPoints\":24121,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":-700000,\"gridCellMaxY\":-600000,\"minTime\":1300367181,\"maxTime\":1300380536,\"totalPoints\":14500,\"numberOfShards\":1},{\"gridCellMinX\":600000,\"gridCellMaxX\":700000,\"gridCellMinY\":-600000,\"gridCellMaxY\":-500000,\"minTime\":1301320724,\"maxTime\":1301320724,\"totalPoints\":449,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":-400000,\"gridCellMaxY\":-300000,\"minTime\":1300369509,\"maxTime\":1301063177,\"totalPoints\":29344,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":-500000,\"gridCellMaxY\":-400000,\"minTime\":1300368733,\"maxTime\":1301063954,\"totalPoints\":42164,\"numberOfShards\":1},{\"gridCellMinX\":-300000,\"gridCellMaxX\":-200000,\"gridCellMinY\":-300000,\"gridCellMaxY\":-200000,\"minTime\":1300370285,\"maxTime\":1300377820,\"totalPoints\":23951,\"numberOfShards\":1},{\"gridCellMinX\":-200000,\"gridCellMaxX\":-100000,\"gridCellMinY\":-2600000,\"gridCellMaxY\":-2500000,\"minTime\":1301588689,\"maxTime\":1301592282,\"totalPoints\":18203,\"numberOfShards\":1}]\n"
     ]
    }
   ],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "155\n",
      "218\n",
      "    gridCellMaxX_x  gridCellMaxY_x  gridCellMinX  gridCellMinY   maxTime_x  \\\n",
      "11         -500000        -1300000       -600000      -1400000  1301567315   \n",
      "\n",
      "     minTime_x  numberOfShards_x  totalPoints_x  gridCellMaxX_y  \\\n",
      "11  1300300423                 1          92952         -500000   \n",
      "\n",
      "    gridCellMaxY_y   maxTime_y   minTime_y  numberOfShards_y  totalPoints_y  \n",
      "11        -1300000  1301502296  1299001794                 3        1411025  \n"
     ]
    }
   ],
   "source": [
    "# loads the json output of the getGridCells call and creates a flattened DataFrame.\n",
    "from pandas.io.json import json_normalize\n",
    "import json\n",
    "import pandas as pd\n",
    "\n",
    "oibdata = json.loads(gcsOib)\n",
    "dfOib = json_normalize(oibdata)\n",
    "print(len(dfOib))\n",
    "swathdata = json.loads(gcsSwath)\n",
    "dfSwath = json_normalize(swathdata)\n",
    "\n",
    "print(len(dfSwath))\n",
    "\n",
    "joined = pd.merge(dfOib, dfSwath, on=['gridCellMinX','gridCellMinY'], how='inner')\n",
    "\n",
    "\n",
    "print(joined[joined['totalPoints_x'] > 90000])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/data/puma1/scratch/v2/malard/export/cryotempo_oib_975171745.nc\n",
      "/data/puma1/scratch/v2/malard/export/cryotempo_GRIS_BaseC_Q2_975171745.nc\n"
     ]
    }
   ],
   "source": [
    "minX = -500000\n",
    "maxX = minX + 100000\n",
    "minY = -1300000\n",
    "maxY = minY + 100000 \n",
    "\n",
    "#No filters\n",
    "oib = queryAsync.executeQuery(  'cryotempo','oib','greenland',minX,maxX,minY,maxY,minT,maxT,[],[])\n",
    "#Converts the NetCDF into a DataFrame.\n",
    "dfOib = MalardHelpers.getDataFrameFromNetCDF(oib.resultFileName)\n",
    "\n",
    "print(oib.resultFileName)\n",
    "\n",
    "#No filters\n",
    "swath = queryAsync.executeQuery(  'cryotempo','GRIS_BaseC_Q2','greenland',minX,maxX,minY,maxY,minT,maxT,[],[])\n",
    "#Converts the NetCDF into a DataFrame.\n",
    "dfSwath = MalardHelpers.getDataFrameFromNetCDF(swath.resultFileName)\n",
    "\n",
    "print(swath.resultFileName)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "import matplotlib.pyplot as plt\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAArUAAAJDCAYAAAAVa+xFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nO3df5RcZ33n+ffXbbWRwoAaDAG1bOwsyk66AwnQY2CSM+MggW32gPm5x460OAlnPNuNZ0+WYRazLJAl5EzIzB5myGBlvMDyQ70xDrsM3tjEiwQM5xB+WMYGLBnHwgQ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lmjkOYJ1/Z7r9h4a+5lrtSom6vqo7wP4ax6bQP9LwD4W/7jZBNwF/HLx+j4Wf0icvtBguujzZ5x5ocFc8fxNnHmhwY3F82nOvNDgPmp8oUGXc/QMHruw5yLg+yz+Vd7qc7T0PC1p/whnXij2XRYvxJgonj+l2HYbixdVnL4Y4+VF+7/hzIsx/qh4/t9w5sUYXxv2Oejh++nZHd9PzweOFO/H83TmeTqfxfmb/3jJPq3+3HX7zAG/x5kXirX6HHX5Xur6efAz18zH0AfgY8D/wZf8UAT+FYsrINwF/G5H+8uBv2Lxate3d7T/AotXhh4qfkCeU7Q/oXh9qNj+Cx193l4c5x6Kq0jr/FjyA/Ea4EDxg/0rdPySbfM56va91NH+EYpQW7z+neI9HwJ+u6N9pvi++w7wH3gs7D2VxT+27i3+Pf2LJoAPFPt/C5gZ9jno4fvprcX3053Al4Ff9zx1PU8fBI4V5+lOFm+beXq/1n7uePwf3IeB/wIcL54/qe3nqMt5Wvbz0PbPXBMf3lFMkiRJI8/VDyRJkjTyDLWSJEkaeYZaSZIkjTxDrSRJkkaeoVaSJEkjz1ArSZKkkWeolSRJ0sgz1EqSJGnk/f8zCxZ5Rjp6ugAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 864x720 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "## plot with no filters\n",
    "plt.figure(figsize=(12,10))\n",
    "plt.scatter(x=dfOib['x'], y=dfOib['y'], c='red')\n",
    "#plt.scatter(x=dfSwath['x'], y=dfSwath['y'], c=dfSwath['elev'], marker='.', s=20, vmax=7500)\n",
    "plt.colorbar()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "## plot with filters\n",
    "plt.figure(figsize=(12,10))\n",
    "#vmin and vmax set min and max of colour bar\n",
    "plt.scatter(x=withFilter['x'], y=withFilter['y'], c=withFilter['elev'], marker='.', s=20, vmax=dfNoFilter['elev'].max(), vmin=dfNoFilter['elev'].min())\n",
    "plt.colorbar()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "#swathDetails - information about the source swath data and how the DataSetLoader did the gridding.\n",
    "results = query.getSwathDetails('mtngla','tdx','himalayas')\n",
    "\n",
    "print(results)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "swathById = query.getSwathDetailsFromId('mtngla','tandemx','himalayas',1)\n",
    "\n",
    "print(swathById)\n",
    " \n",
    "swathByName = query.getSwathDetailsFromName('mtngla','tdx','himalayas','CS_LTA__SIR_SIN_2S_20100716T075344_20100716T075554_C001.nc')\n",
    "\n",
    "print(swathByName)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "#swathDetails - get all the swaths for a particular data set.\n",
    "import pandas as pd\n",
    "import MalardHelpers as m\n",
    "\n",
    "df = m.getSwathDetailsAsDataFrame('mtngla','tdx','himalayas',query)\n",
    "\n",
    "print(df[0:1])\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import json\n",
    "swathDetails = json_normalize(json.loads(query.getSwathDetails('mtngla','tdx','himalayas')))\n",
    "\n",
    "print(len(swathDetails['swathName']))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'Published: /data/puma1/scratch/v2/malard/mask/test_ja/static/RS6/Glacier/HMA/cell_x500000_y0_s100000/testmask.shp'"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sourcePath = '/data/snail1/scratch/test/'#put your input path in here\n",
    "fileName = 'testmask.shp'#put your test file in here\n",
    "parentDsName = 'test_ja'\n",
    "dataSet = 'RS6'\n",
    "maskType = 'Glacier' \n",
    "region = 'HMA' \n",
    "minX = 500000 \n",
    "minY = 0 \n",
    "size = 100000 \n",
    "\n",
    "query.publishMask(sourcePath, fileName, parentDsName, dataSet, maskType, region, minX, minY, size )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[{\"dataSet\":\"RS6\",\"type\":\"Glacier\",\"region\":\"HMA\"}]\n"
     ]
    }
   ],
   "source": [
    "print(query.getMasks('test_ja'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "parentdataset = 'mtngla'\n",
    "dataSet = 'RGIv60'\n",
    "maskType = 'Glacier'\n",
    "region = 'HMA'\n",
    "\n",
    "print(query.getGridCellMasks(parentdataset, dataSet, maskType, region))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "#gets the mask for a gridcell.\n",
    "\n",
    "print(query.getGridCellMask(parentdataset, dataSet, maskType, region,minX,minY,size))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "parentDsName = 'test'\n",
    "runName = 'gctest_2'\n",
    "minX = 0.0\n",
    "minY = 200000.0\n",
    "size = 100000.0\n",
    "\n",
    "#expects a dictionary of string to double.\n",
    "statistics = {'NumberOfPoints':1000,'MaskedPoints':500}\n",
    "\n",
    "query.publishGridCellStats( parentDsName, runName, minX, minY, size, statistics )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "#get the available run statistics\n",
    "parentDsName = 'mtngla'\n",
    "query.getAvailableRunStatistics( parentDsName )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "#get the statistics for a gridcell.\n",
    "query.getGridCellStatistics(parentDsName, runName, minX, minY, size)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "query.getRunStatistics(parentDsName,\"TestRun\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "#Get the proj4 for code for the given shortCode.\n",
    "print( query.getProjection('HMA'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<AsyncDataSetQuery.PublisherInfo at 0x7f38c8ded470>"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#Publish points for a grid cell.\n",
    "parentDataSet = 'mtngla' #intended usage mtngla\n",
    "dataSet = 'tdxtest1'\n",
    "region = 'himalayas'\n",
    "projection = 'HMA'\n",
    "sourceFileName = '/data/snail1/scratch/tandemx/swath/y2017/m6/cell_HMA_0_600000/GridCell_0.nc'\n",
    "minX = 0\n",
    "minY = 600000\n",
    "minT = datetime.datetime(2017,6,1).timestamp()\n",
    "size = 100000\n",
    "\n",
    "queryAsync.publishGridCellPoints(parentDataSet, dataSet,region, minX, minY,minT, size, sourceFileName, projection)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
